package com.inheritance.service.impl;

import com.inheritance.entity.Tabs;
import com.inheritance.mapper.TabsMapper;
import com.inheritance.service.TabsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class TabsServiceImpl extends ServiceImpl<TabsMapper, Tabs> implements TabsService {

    @Resource
    private TabsMapper tabsMapper;

    @Override
    public List<Tabs> list() {
        return tabsMapper.selectList(null);
    }

    @Override
    public int upload(Tabs tabs) {
        return tabsMapper.insert(tabs);
    }

    @Override
    public int delete(String id) {
        return tabsMapper.deleteById(id);
    }

    @Override
    public int update(Tabs tabs) {
        return tabsMapper.updateById(tabs);
    }
}
